-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't write to parent repo #1524
Don't write to parent repo #1524
Conversation
In _try_clone_from_payload_link, don't try to do the clone in the parent repo, because we don't want to modify that. parent repos are typically used when you want a shared, immutable base. For example in flatpak, the parent repo is the system repo which you don't have write access to, so any modification to it will fail with EACCES, making it impossible to install via the system helper.
do you have a log with the error? If possible, I'd like to fix it in a way that the lookup is still done in the parent repository, but no write should happen there. |
What fails is the glnx_open_tmpfile_linkable_at()->open(O_TMPFS) gets EACCES in _check_support_reflink() on the parent repo, because its is only writable by root. But also, even if this would not break, the entire thing seems to depend on any reflinks to work if _check_support_reflink returns true. However if the parent and child repos are on different filesystem you might not be able to reflink between them, even if both are on reflink supporting filesystems. |
Unfortunately while we do run the flatpak unit tests as part of our CI, that doesn't cover "real" usage like this. And I personally tend to mostly only test ostree git with rpm-ostree. We can clearly wire up more "real" usage testing in CI, it's one of the things I'm working on now. Short term I'll add "flatpak sanity checks" to my "before ostree release" checklist. |
☀️ Test successful - status-atomicjenkins |
We should probably backport this fix to F28... |
Sure, I can do that, or feel free to do so if you prefer. I'm not immediately reproducing the problem though; does it only occur when the host fs supports reflinks (are you still on btrfs as |
Answer: yes. |
(Also just leaving this breadcrumb for future self and others: be sure to |
This fixes installing via flatpak system helper on systems where the host fs supports reflinks. ostreedev/ostree#1524
In _try_clone_from_payload_link, don't try to do the clone in the
parent repo, because we don't want to modify that. parent repos are
typically used when you want a shared, immutable base.
For example in flatpak, the parent repo is the system repo which you
don't have write access to, so any modification to it will fail with
EACCES, making it impossible to install via the system helper.